package org.zappee.dannyt.cairngorm.command
{
	import com.adobe.cairngorm.commands.ICommand;
	import com.adobe.cairngorm.control.CairngormEvent;
	
	import mx.collections.ICollectionView;
	import mx.rpc.IResponder;
	
	import org.zappee.dannyt.cairngorm.model.ModelLocator;
	import org.zappee.dannyt.cairngorm.service.BugDelegate;

	public class GetBugsCommand implements ICommand, IResponder
	{
		public function GetBugsCommand()
		{
		}
		
		public function execute(event:CairngormEvent):void
		{
			var bugService:BugDelegate = new BugDelegate(this);
			bugService.getBugs();
		}
		
		public function result(data:Object):void
		{
			ModelLocator.getInstance().bugs = data.result;
		}
		
		public function fault(info:Object):void
		{
		}
		
	}
}